package cn.edu.ctbu.bootstraptablepage.exception;

import lombok.Data;

@Data
public class RException extends RuntimeException {

    private Integer code;

    public RException(Integer code,String msg){
         super(msg);
        this.code = code;


    }
    public enum REnum{
        UNKNOWN_ERR(-999,"一般错误"),
        COMMON_ERR(-10,"一般性错误"),
        LOGIN_ERR(-1,"出错了不正确的用户名和密码！"),
        SUCCESS(1,"成功");
        private Integer code;
        private String msg;
        REnum(Integer code,String msg){
            this.code = code;
            this.msg = msg;
        }
        public Integer getCode() {
            return code;
        }
        public String getMsg() {
            return msg;
        }
    }
}
